3.1.77 \(\int \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx\) [77]

Optimal. Leaf size=62 \[ \frac {2 a (3 A+B) \sin (c+d x)}{3 d \sqrt {a+a \cos (c+d x)}}+\frac {2 B \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{3 d} \]

[Out]

2/3*a*(3*A+B)*sin(d*x+c)/d/(a+a*cos(d*x+c))^(1/2)+2/3*B*sin(d*x+c)*(a+a*cos(d*x+c))^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2830, 2725} \begin {gather*} \frac {2 a (3 A+B) \sin (c+d x)}{3 d \sqrt {a \cos (c+d x)+a}}+\frac {2 B \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Cos[c + d*x]]*(A + B*Cos[c + d*x]),x]

[Out]

(2*a*(3*A + B)*Sin[c + d*x])/(3*d*Sqrt[a + a*Cos[c + d*x]]) + (2*B*Sqrt[a + a*Cos[c + d*x]]*Sin[c + d*x])/(3*d
)

Rule 2725

Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2*b*(Cos[c + d*x]/(d*Sqrt[a + b*Sin[c + d*x
]])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2830

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d
)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(f*(m + 1))), x] + Dist[(a*d*m + b*c*(m + 1))/(b*(m + 1)), Int[(a + b*S
in[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&  !LtQ[m
, -2^(-1)]

Rubi steps

\begin {align*} \int \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx &=\frac {2 B \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{3 d}+\frac {1}{3} (3 A+B) \int \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a (3 A+B) \sin (c+d x)}{3 d \sqrt {a+a \cos (c+d x)}}+\frac {2 B \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 46, normalized size = 0.74 \begin {gather*} \frac {2 \sqrt {a (1+\cos (c+d x))} (3 A+2 B+B \cos (c+d x)) \tan \left (\frac {1}{2} (c+d x)\right )}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Cos[c + d*x]]*(A + B*Cos[c + d*x]),x]

[Out]

(2*Sqrt[a*(1 + Cos[c + d*x])]*(3*A + 2*B + B*Cos[c + d*x])*Tan[(c + d*x)/2])/(3*d)

________________________________________________________________________________________

Maple [A]
time = 0.18, size = 62, normalized size = 1.00

method result size
default \(\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (2 B \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 A +B \right ) \sqrt {2}}{3 \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) \(62\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

2/3*cos(1/2*d*x+1/2*c)*a*sin(1/2*d*x+1/2*c)*(2*B*cos(1/2*d*x+1/2*c)^2+3*A+B)*2^(1/2)/(a*cos(1/2*d*x+1/2*c)^2)^
(1/2)/d

________________________________________________________________________________________

Maxima [A]
time = 0.54, size = 57, normalized size = 0.92 \begin {gather*} \frac {6 \, \sqrt {2} A \sqrt {a} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + {\left (\sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} B \sqrt {a}}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="maxima")

[Out]

1/3*(6*sqrt(2)*A*sqrt(a)*sin(1/2*d*x + 1/2*c) + (sqrt(2)*sin(3/2*d*x + 3/2*c) + 3*sqrt(2)*sin(1/2*d*x + 1/2*c)
)*B*sqrt(a))/d

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 47, normalized size = 0.76 \begin {gather*} \frac {2 \, {\left (B \cos \left (d x + c\right ) + 3 \, A + 2 \, B\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="fricas")

[Out]

2/3*(B*cos(d*x + c) + 3*A + 2*B)*sqrt(a*cos(d*x + c) + a)*sin(d*x + c)/(d*cos(d*x + c) + d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )} \left (A + B \cos {\left (c + d x \right )}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(d*x+c))**(1/2)*(A+B*cos(d*x+c)),x)

[Out]

Integral(sqrt(a*(cos(c + d*x) + 1))*(A + B*cos(c + d*x)), x)

________________________________________________________________________________________

Giac [A]
time = 0.45, size = 70, normalized size = 1.13 \begin {gather*} \frac {\sqrt {2} {\left (B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3 \, {\left (2 \, A \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a}}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="giac")

[Out]

1/3*sqrt(2)*(B*sgn(cos(1/2*d*x + 1/2*c))*sin(3/2*d*x + 3/2*c) + 3*(2*A*sgn(cos(1/2*d*x + 1/2*c)) + B*sgn(cos(1
/2*d*x + 1/2*c)))*sin(1/2*d*x + 1/2*c))*sqrt(a)/d

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \left (A+B\,\cos \left (c+d\,x\right )\right )\,\sqrt {a+a\,\cos \left (c+d\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*cos(c + d*x))*(a + a*cos(c + d*x))^(1/2),x)

[Out]

int((A + B*cos(c + d*x))*(a + a*cos(c + d*x))^(1/2), x)

________________________________________________________________________________________